/**
 *
 */
package idao;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * An interface used to process returned result set. Implementations must have a
 * no arugment constructor.
 * 
 * @author huhao
 */
public interface ResultSetHandler
{

    /**
     * This is where ResultSet processing resides. Nothing has been done to the
     * ResultSet before passing it to this method. That means method next() must
     * be called first before extracting data from it. And implementations
     * should not call method close().
     * 
     * @return the result object
     * @throws SQLException
     *         if a SQLException is encountered
     */
    Object handleResultSet(ResultSet rs) throws SQLException;
}
